import { AfterViewInit, Component, OnDestroy, OnInit, Renderer, Renderer2 } from '@angular/core';
import { _HttpClient, SettingsService } from '@delon/theme';
import { NzMessageService } from 'ng-zorro-antd';
import {HttpClient} from "@angular/common/http";
declare const echarts: any;
@Component({
  selector: 'app-dashboard',
  templateUrl: './dashboard.component.html',
  styleUrls: ['./dashboard.component.css']
})
export class DashboardComponent implements OnInit, AfterViewInit, OnDestroy {
  contentHeight: number;
  width: number
  constructor(
    public setting: SettingsService,
    private http: HttpClient,
  ) {
    this.contentHeight = document.body.offsetHeight - 64;
    this.width = document.body.offsetWidth;
    window.addEventListener('resize', () => {
      this.contentHeight = document.body.offsetHeight - 64;
      this.width = document.body.offsetWidth;
    })
  }
  ngAfterViewInit(): void {
    setInterval(() => {
      this.http.post('http://1.15.114.206:8000/statistics/push/100?message=sdadasd', {}).subscribe(res => {
      })
    }, 10000)
  }

  ngOnDestroy(): void {
  }

  ngOnInit(): void {
  }

}

